package delegate

import (
	"fmt"
	"time"
)

type tTimeMsgHandler struct {
}

func newTimeMsgHandler() IMsgHandler {
	return &tTimeMsgHandler{}
}

func (me *tTimeMsgHandler) Handle(request IMsg) IMsg {
	fmt.Printf("  tTimeMsgHandler.Handle, id=%v, cls=%v\n", request.ID(), request.Class())

	timeMsg := request.(*TimeMsg)
	timeMsg.sContent = time.Now().Format("2006-01-02T15:04:05")
	return timeMsg
}